package edu.iss.demo.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import edu.iss.demo.model.PublicHoliday;
import edu.iss.demo.repository.PublicHolidayRepository;

@Service
public class PublicHolidayImpl implements PublicHolidayService
{
	
	@Resource
	private PublicHolidayRepository pubRep;

	@Override
	@Transactional
	public PublicHoliday create(PublicHoliday p)
	{
		PublicHoliday pnew=p;
		return pubRep.save(pnew);
	
	}

	@Override
	public List<PublicHoliday> findAll() 
	{
		return pubRep.findAll();
	}

}
